package com.csdj.sc.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author cloud
 * @since 2021-12-09
 */
public class User extends Model {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 上级用户id
     */
    private Integer topId;

    /**
     * 0-锁定 1-正常
     */
    private Integer status;

    /**
     * 最近登录时间
     */
    private LocalDateTime lastLoginTm;

    /**
     * 注册时间
     */
    private LocalDateTime createTm;

    /**
     * 1-管理员 2-员工管理者 3-预留 4-预留  5-普通用户
     */
    private Integer roleId;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getTopId() {
        return topId;
    }

    public void setTopId(Integer topId) {
        this.topId = topId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public LocalDateTime getLastLoginTm() {
        return lastLoginTm;
    }

    public void setLastLoginTm(LocalDateTime lastLoginTm) {
        this.lastLoginTm = lastLoginTm;
    }

    public LocalDateTime getCreateTm() {
        return createTm;
    }

    public void setCreateTm(LocalDateTime createTm) {
        this.createTm = createTm;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    @Override
    public String toString() {
        return "User{" +
        "id=" + id +
        ", username=" + username +
        ", password=" + password +
        ", topId=" + topId +
        ", status=" + status +
        ", lastLoginTm=" + lastLoginTm +
        ", createTm=" + createTm +
        ", roleId=" + roleId +
        "}";
    }
}
